package com.reading.common.entity.view;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import java.util.Date;

@Getter
@Setter
@ToString
@NoArgsConstructor
public class User {

    private Integer userId;

    @NotEmpty(message = "邮箱不得为空。")
    @Email(message = "邮箱格式错误。")
    private String userEmail;

    private String nickName;

    private Integer headImg;

    private Integer userGender;

    private String userDescr;

    @NotEmpty(message = "用户密码不得为空。")
    @Length(min = 6, max = 12, message = "用户密码长度应为6~12个数字字母或符号。")
    private String password;

    private String salt;

    private Integer userStatus;

    private Date createTime;
}